package com.osfw.activiti.service.history;


import com.baomidou.mybatisplus.extension.service.IService;
import com.osfw.activiti.domain.ProcessApproval;
import com.osfw.activiti.domain.ProcessExecResult;
import com.osfw.activiti.domain.ProcessNodeInfo;
import com.osfw.activiti.entity.history.ActHiProcinst;
import com.osfw.activiti.entity.resource.ActReProcdef;
import com.osfw.system.entity.manage.SysUser;

import java.util.Date;

/**
 * 流程实例表 服务层
 */
public interface IActHiProcinstService extends IService<ActHiProcinst> {

    /**
     * 初始化流程实例信息
     *
     * @param title     标题
     * @param busiType  业务类型
     * @param busiKey   业务KEY
     * @param startUser 发起人
     * @param startTime 开始时间
     * @param procdef   流程信息
     * @param startNode 开始节点
     */
    ActHiProcinst init(String title, String busiType, String busiKey, SysUser startUser, Date startTime, ActReProcdef procdef, ProcessNodeInfo startNode);

    ActHiProcinst finish(ProcessApproval approval, SysUser sysUser, Date currentTime, ProcessExecResult execResult);

}
